package org.cpoy.eims.entity;

// Generated Feb 24, 2011 8:45:00 AM by Hibernate Tools 3.3.0.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.NotNull;

/**
 * StudentAdmission generated by hbm2java
 */
@Entity
@Table(name = "student_admission")
public class StudentAdmission implements java.io.Serializable {

	private int id;
	private Parent parent;
	private Student student;
	private Date admissionDate;
	private int admissionFeeAmount;
	private int specialFeeAmount;
	private Date paymentDate;
	private boolean eligibleForScholarship;

	public StudentAdmission() {
	}

	public StudentAdmission(int id, Student student,
			Parent parent, Date admissionDate, int admissionFeeAmount,
			int specialFeeAmount, Date paymentDate,
			boolean eligibleForScholarship) {
		this.id = id;
		this.student = student;
		this.parent = parent;
		this.admissionDate = admissionDate;
		this.admissionFeeAmount = admissionFeeAmount;
		this.specialFeeAmount = specialFeeAmount;
		this.paymentDate = paymentDate;
		this.eligibleForScholarship = eligibleForScholarship;
	}
	
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "student_id", nullable = false)
	@NotNull
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "admitted_by_id", nullable = false)
	@NotNull
	public Parent getParent() {
		return this.parent;
	}

	public void setParent(Parent parent) {
		this.parent = parent;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "admission_date", nullable = false, length = 10)
	@NotNull
	public Date getAdmissionDate() {
		return this.admissionDate;
	}

	public void setAdmissionDate(Date admissionDate) {
		this.admissionDate = admissionDate;
	}

	@Column(name = "admission_fee_amount", nullable = false)
	public int getAdmissionFeeAmount() {
		return this.admissionFeeAmount;
	}

	public void setAdmissionFeeAmount(int admissionFeeAmount) {
		this.admissionFeeAmount = admissionFeeAmount;
	}

	@Column(name = "special_fee_amount", nullable = false)
	public int getSpecialFeeAmount() {
		return this.specialFeeAmount;
	}

	public void setSpecialFeeAmount(int specialFeeAmount) {
		this.specialFeeAmount = specialFeeAmount;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "payment_date", nullable = false, length = 10)
	@NotNull
	public Date getPaymentDate() {
		return this.paymentDate;
	}

	public void setPaymentDate(Date paymentDate) {
		this.paymentDate = paymentDate;
	}

	@Column(name = "eligible_for_scholarship", nullable = false)
	public boolean isEligibleForScholarship() {
		return this.eligibleForScholarship;
	}

	public void setEligibleForScholarship(boolean eligibleForScholarship) {
		this.eligibleForScholarship = eligibleForScholarship;
	}

}
